import Layout from '@/layout'

/**
    //当设置 true 的时候该路由不会再侧边栏出现 如401，login等页面，或者如一些编辑页面/edit/1
    hidden: true // 如果设置为true，项目将不会显示在侧栏中(默认为false)(默认 false)

    //当设置 noredirect 的时候该路由在面包屑导航中不可被点击
    redirect: 'noredirect'

    //当你一个路由下面的 children 声明的路由大于1个时，自动会变成嵌套的模式--如组件页面
    //只有一个时，会将那个子路由当做根路由显示在侧边栏--如引导页面
    //若你想不管路由下面的 children 声明的个数都显示你的根路由
    //你可以设置 alwaysShow: true，这样它就会忽略之前定义的规则，一直显示根路由
    alwaysShow: true   //如果设置为true，将始终显示根菜单, 如果不总是设置show，当项目有多个子路由时,它将成为嵌套模式，否则不显示根菜单

    name: 'router-name' //设定路由的名字，一定要填写不然使用<keep-alive>时会出现各种问题
    meta: {
      roles: ['admin', 'editor'] //设置该路由进入的权限，支持多个权限叠加
      title: 'title' //设置该路由在侧边栏和面包屑中展示的名字
      icon: 'svg-name' //设置该路由的图标
      noCache: true //如果设置为true，则不会被 <keep-alive> 缓存(默认 false)
      breadcrumb: false // 如果设置为false，则不会在breadcrumb面包屑中显示
      activeMenu: '/example/list'  如果设置路径，侧栏将突出显示您设置的路径
    }
*/

export default [
  {
    path: "/login",
    component: () => import("@/views/login/index"),
    hidden: true
  },

  {
    path: "/404",
    component: () => import("@/views/404"),
    hidden: true
  },

  {
    path: "/",
    component: Layout,
    redirect: "/home",
    children: [
      {
        path: "home",
        name: "Home",
        component: () => import("@/views/home/index"),
        meta: { title: "首页", icon: "dashboard" }
      }
    ]
  },
  {
    path: "/marketInfoMge",
    component: Layout,
    children: [
      {
        path: "marketInfoMge",
        name: "MarketInfoMge",
        component: () => import("@/views/marketInfoMge/marketInfoMge"),
        meta: { title: "市场信息管理", icon: "dashboard" }
      }, {
        path: "/marketInfoMge/marketInfoDetail",
        name: "/marketInfoDetail",
        component: () => import("@/views/marketInfoMge/marketInfoDetail"),
        hidden: true
      }
    ]
  },
  {
    path: "/datatarget",
    component: Layout,
    children: [
      {
        path: "datatarget",
        name: "Datatarget",
        component: () => import("@/views/datatarget/datatarget"),
        meta: { title: "数据指标设置", icon: "dashboard" }
      }
    ]
  },
  {
    path: "/passenger",
    component: Layout,
    children: [
      {
        path: "passenger",
        name: "Passenger",
        component: () => import("@/views/passenger/passenger"),
        meta: { title: "市场客流统计", icon: "dashboard" }
      }
    ]
  },
  {
    path: "/transaction",
    component: Layout,
    children: [
      {
        path: "transaction",
        name: "Transaction",
        component: () => import("@/views/marketTransaction/transaction"),
        meta: { title: "市场交易统计", icon: "dashboard" }
      },{
        path: "/transaction/translist",
        name: "/translist",
        component: () => import("@/views/marketTransaction/translist"),
        hidden: true
      }
    ]
  },
  {
    path: "/footStatis",
    component: Layout,
    children: [
      {
        path: "footStatis",
        name: "footStatis",
        component: () => import("@/views/footStatis/footStatis"),
        meta: { title: "菜品交易统计", icon: "dashboard" }
      }
    ]
  },
  // {
  //   path: "/DetectionInfo",
  //   component: Layout,
  //   children: [
  //     {
  //       path: "DetectionInfo",
  //       name: "DetectionInfo",
  //       component: () => import("@/views/DetectionInfo/DetectionInfo"),
  //       meta: { title: "检测信息统计", icon: "dashboard" }
  //     }
  //   ]
  // },
  // {
  //   path: "/selfcheck",
  //   component: Layout,
  //   children: [
  //     {
  //       path: "selfcheck",
  //       name: "selfcheck",
  //       component: () => import("@/views/selfcheck/selfcheck"),
  //       meta: { title: "市场自检查询", icon: "dashboard" }
  //     }
  //   ]
  // },
  {
    path: "/reportData",
    component: Layout,
    children: [
      {
        path: "reportData",
        name: "reportData",
        component: () => import("@/views/reportData/index"),
        meta: { title: "上传数据分析", icon: "dashboard" }
      }
    ]
  },
  // {
  //   path: "/cs",
  //   component: Layout,
  //   children: [
  //     {
  //       path: "cs",
  //       name: "cs",
  //       component: () => import("@/views/cs/cs"),
  //       meta: { title: "测试", icon: "dashboard" }
  //     }
  //   ]
  // },
  { path: "*", redirect: "/404", hidden: true }
];
